package com.example.demospring.service.counselor;

import com.example.demospring.entity.ConsultationCaseReport;
import com.example.demospring.dto.counselor.ConsultationCaseReportDTO;
import com.example.demospring.repository.ConsultationCaseReportRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;
@Service
public class ConsultationCaseReportService {

    @Autowired
    private ConsultationCaseReportRepository reportRepository;

    public ConsultationCaseReport save(ConsultationCaseReport report) {
        return reportRepository.save(report);
    }

    public Optional<ConsultationCaseReport> findById(Integer id) {
        return reportRepository.findById(id);
    }

    public Optional<ConsultationCaseReport> findByAppointmentId(Integer appointmentId) {
        return reportRepository.findByAppointmentId(appointmentId);
    }

    public void deleteById(Integer id) {
        reportRepository.deleteById(id);
    }


}